package org.kabeja.dxf.entity;

import org.kabeja.dxf.helpers.HatchLineFamily;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

/**
 * @author shutao
 * @since 2022/4/24 17:46
 */
public class DXFHatchPattern {
    private static int idCount = 0;
    private String id = null;
    private List<HatchLineFamily> patterns = new ArrayList<>();
    private DXFHatch hatch;

    public DXFHatchPattern() {
    }

    public String getID() {
        if (this.id == null) {
            this.id = "HATCH_PATTERN_ID_" + idCount;
            ++idCount;
        }

        return this.id;
    }

    public void setID(String var1) {
        this.id = var1;
    }

    public void addLineFamily(HatchLineFamily var1) {
        this.patterns.add(var1);
    }

    public Iterator<HatchLineFamily> getLineFamilyIterator() {
        return this.patterns.iterator();
    }

    public DXFHatch getDXFHatch() {
        return this.hatch;
    }

    public void setHatch(DXFHatch var1) {
        this.hatch = var1;
    }

    public int getLineFamilyCount() {
        return this.patterns.size();
    }
}
